export interface FormSchema {
  field: string
  label: string
  component: string
  componentProps?: any
  value?: string
  api?: any
}

export enum ComponentNameEnum {
  INPUT = 'Input',
}

type CamelCaseComponentName = keyof typeof ComponentNameEnum extends infer K
  ? K extends string
    ? K extends `${infer A}_${infer B}`
      ? `${Capitalize<Lowercase<A>>}${Capitalize<Lowercase<B>>}`
      : Capitalize<Lowercase<K>>
    : never
  : never

export type ComponentName = CamelCaseComponentName
